package main;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

import org.msgpack.annotation.Message;

/**
 * 英雄管理类
 * @author jinmiao
 * 2016年6月7日
 *
 */
@Message
public class HeroManager implements Serializable{

	private transient static final long serialVersionUID = 1L;

	public Map<Integer, HeroModel> heros = new HashMap<Integer, HeroModel>();

	public HeroModel get(int heroId)
	{
		return heros.get(heroId);
	}
	
	public void set(HeroModel heroModel)
	{
		this.heros.put(heroModel.getHeroId(), heroModel);
	}
	
	
	public void addHeroModel(HeroModel model)
	{
		heros.put(model.getHeroId(), model);	
	}
	    
}
